package com.gss.armory.master;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.gss.common.util.ApplicationMaps;

@Entity
@Table(name="LC_USER_ROLE_MAPPING")
public class UserRoleMappingAuthDTO implements Serializable {

	public String userName;
	public String roleId;
	public String roleDesc;
	private String[] roles;
	
	@Id
	@Column(name="URM_USER_ID")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	@Id
	@Column(name="URM_ROLE_ID")
	public String getRoleId() {
		return roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	
	@Transient
	public String getRoleDesc() {
		return ApplicationMaps.ROLEID_ROLENAME_MAP.get(roleId);
	}
	public void setRoleDesc(String roleDesc) {
		this.roleDesc = roleDesc;
	}
	
	@Transient
	public String[] getRoles() {
		return roles;
	}
	public void setRoles(String[] roles) {
		this.roles = roles;
	}
}
